<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/commons/taglibs.jsp"%>

<div class="sidebar-menu">
    <div class="left-main left-full" >
        <div class="sidebar-fold"><span class="glyphicon glyphicon-menu-hamburger"></span></div>
        <div class="sub-navBox">
            <c:forEach  items="${menuList}" var="menu" varStatus="index">
                <c:if test="${menu.parentId == 0}" >
                <div class="sbox">
                    <div class="sub-nav sublist-up">
                        <div class="showtitle" style="width: 100px; display: none;">${menu.menuName}</div>
                            <span class="title-icon fa fa-caret-right"></span>
                            <span class="sublist-title">${menu.menuName}</span>
                    </div>
                    <ul class="nav-content" style="display: none;">
                        <c:forEach items="${menuList}" var="subMenu1" >
                            <c:if test="${subMenu1.parentId == menu.id}" >
                                <c:if test="${empty subMenu1.href}">
                                    <li>
                                        <div class="showtitle" style="width:100px;cursor: pointer;" onclick="javascript:addTab('${subMenu1.menuName}','${basePath}/${subMenu1.href}');">${subMenu1.menuName}</div>
                                        <a href="#">
                                            <span class="sublist-icon  fa ${empty subMenu2.menuIcon ? 'fa-location-arrow':subMenu2.menuIcon}"></span>
                                            <span class="sub-title">${subMenu1.menuName}</span>
                                        </a>
                                    </li>
                                </c:if>
                                <c:if test="${not empty subMenu1.href}">
                                    <li>
                                        <div class="showtitle" style="width:100px;cursor: pointer;" onclick="javascript:addTab('${subMenu1.menuName}','${basePath}/${subMenu1.href}');">${subMenu1.menuName}</div>
                                       <a href="javascript:addTab('${subMenu1.menuName}','${basePath}/${subMenu1.href}');">
                                            <span class="sublist-icon fa ${empty subMenu2.menuIcon ? 'fa-location-arrow':subMenu2.menuIcon}"></span>
                                            <span class="sub-title">${subMenu1.menuName}</span>
                                        </a>
                                    </li>
                                </c:if>
                            </c:if>
                        </c:forEach>
                    </ul>
                </div>
                </c:if>
            </c:forEach>
        </div>
    </div>
</div>